<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<%= link_to "eStuk_CN", root_path, class: "navbar-brand"%>
</div>

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
</ul>
<form class="navbar-form navbar-left" role="search">
</form>
<ul class="nav navbar-nav navbar-right">
<% if current_user %>
<li><%= link_to "书籍", books_path%></li>
<li><a href="#">控制台</a></li>
<li><%= link_to "设置", edit_user_registration_path%></li>
<li><%= link_to "登出", destroy_user_session_path, method: :delete%></li>
<% else %>
<li><a href="#">书籍</a></li>
<li><%= link_to "登录", new_user_session_path%></li>
<% end %>


</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>